<template>
  <el-collapse v-model="activeName" accordion>
    <el-collapse-item title="修改个人信息" name="1">
      <profile-change-info :userinfo="userinfo" @update="$emit('update')"></profile-change-info>
    </el-collapse-item>
    <el-collapse-item title="修改密码" name="2">
      <profile-change-password></profile-change-password>
    </el-collapse-item>
  </el-collapse>
</template>

<script>
  import ProfileChangeInfo from './ProfileChangeInfo'
  import ProfileChangePassword from './ProfileChangePassword'

  export default {
    name: 'ProfileForm',
    components: { ProfileChangePassword, ProfileChangeInfo },
    data: function() {
      return {
        activeName: "1",
      }
    },
    props: {
      userinfo: {
        ssn: null,
        username: null,
        phoneNum: null,
        orgName: null,
        roleName: null,
      }
    }
  }
</script>

<style scoped>

</style>
